home *** CD-ROM | disk | FTP | other *** search
/ Dimension 64 1 / Dimension_64_Nr.01_19xx_-_de_Side_A.d64 / + 17 blocks frei (.txt) < prev    next >
Commodore BASIC  |  2023-02-26  |  2KB  |  74 lines

  1. 10 poke53280,0:poke53281,0
  2. 20 print"[147][158]664 + 17 blocks free"
  3. 30 fori=1to2000:next
  4. 40 print"die 17 blocks kommen von der 18.spur"
  5. 50 open1,8,15,"i":open2,8,2,"#"
  6. 60 dimt(25),s(25),e(25)
  7. 70 print#1,"u1:"2;0;18;0
  8. 80 get#2,t$,s$
  9. 90 t(0)=asc(t$+chr$(0)):s(0)=asc(s$+chr$(0)):t=t(0):s=s(0):b=1
  10. 100 print#1,"u1:"2;0;t;s
  11. 110 get#2,t$,s$
  12. 120 t=asc(t$+chr$(0)):s=asc(s$+chr$(0))
  13. 130 ift=0ort>35ors>20orb=25then160
  14. 140 t(b)=t:s(b)=s:e(b-1)=8:b=b+1
  15. 150 goto100
  16. 160 m=b:f=0:fori=2to226step32
  17. 170 print#1,"b-p:"2,i
  18. 180 get#2,w$
  19. 190 ifw$=""thenf=f+1
  20. 200 nexti
  21. 210 e(b-1)=8-f
  22. 220 iff=8andm=1then700
  23. 230 print"[147]genuegen die";f;"freien directoryplaetze"
  24. 240 geta$:ifa$=""then240
  25. 250 ifa$<>"j"thenprint"ja"
  26. 260 print#1,"u1:"2;0;18;0
  27. 270 print#1,"b-p:"2,73
  28. 280 b=0:l=19:dimz(25):fori=1to3:get#2,w$
  29. 290 w=asc(w$+chr$(0))
  30. 300 forj=1to8:w=w/2:ifw=int(w)thenz(b)=1
  31. 310 ifz(b)=0anda$<>"j"thena$="":z(b)=1
  32. 320 ifz(b)=1andb<19thenl=l-1
  33. 330 b=b+1:w=int(w):nextj,i
  34. 340 ifl<1then710
  35. 350 printl;" bloecke werden frei"
  36. 360 b=0
  37. 370 fore=0toe(b)-1
  38. 380 at=t(b):as=s(b):ns=as:ifat=0andas=0then680
  39. 390 i=0:z=e*32+3
  40. 400 r=0
  41. 410 print#1,"u1:"2;0;at;as
  42. 420 print#1,"b-p:"2,z
  43. 430 get#2,t$,s$
  44. 440 t=asc(t$+chr$(0)):s=asc(s$+chr$(0))
  45. 450 ift=18then660
  46. 460 ift=0ort>35ors>20thenz=1:goto560
  47. 470 fori=0to18step10
  48. 480 ifz(i)=0then530
  49. 490 ifi=9then520
  50. 500 ifi>8theni=i-9:goto480
  51. 510 nexti
  52. 520 z=-1:goto560
  53. 530 print#1,"b-p:"2,z
  54. 540 print#2,chr$(18);chr$(i);
  55. 550 ifat=18andas=nsthenr=1
  56. 560 print"      block";right$("  "+str$(at),3);","right$("  "+str$(as),3);
  57. 570 ifr=1thenprint"  zeiger";e+1;"geaendert":goto590
  58. 580 print"  -->  18,";right$("  "+str$(ns),3)
  59. 590 print#1,"b-a:"0,18,ns
  60. 600 print#1,"b-f:"0,at,as
  61. 610 z(i)=1
  62. 620 print#1,"u2:"2;0;18;ns
  63. 630 at=t:as=s:ns=i
  64. 640 ifz=-1then730
  65. 650 ifz<>1thenz=0:goto400
  66. 660 nexte
  67. 670 b=b+1:goto370
  68. 680 print"nicht alle freien blocks wurden belegt, teile der spur 18 sind noch frei"
  69. 690 goto730
  70. 700 print"die disk ist leer":goto730
  71. 710 print"leider nichts zu machen, keine freien"
  72. 720 print"blocks mehr vorhanden"
  73. 730 print:close1:close2:end
  74.